$(function () {
    loadCuredData("香港")
})

//加载数据
function loadCuredData(name) {
    var pie_curedFive = echarts.init(document.getElementById("cureCount"), 'infographic');
    $.ajax({
        url:"../info/queryCuredCountByName",
        dataType:"json",
        type:"post",
        data:{"provinceName":name},
        success:function (data) {
            option = {
                xAxis: {
                    type: 'category',
                    // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
                    data: data[0],
                    //设置坐标字体颜色
                    axisLine: {
                        lineStyle: {
                            color: "red",
                        }
                    },
                },
                yAxis: {
                    type: 'value',
                    //设置坐标字体颜色
                    axisLine: {
                        lineStyle: {
                            color: "red",
                        }
                    }

                },
                series: [{
                    // data: [120, 200, 150, 80, 70, 110, 130],
                    data: data[1],
                    //设置柱状图颜色
                    color:'blue',
                    type: 'bar',

                }]
            };
            pie_curedFive.setOption(option);
        },error:function () {
            layer.alert("服务器错误");
        }
    })
}
function selectAreaByCured() {
    loadCuredData($("#curedArea").val());
}
